@import com.mgfireworks.mgplatform.mgadmin.user.model.RoleFunc
@extends("/form_template",title=(isEdit?"修改角色":"添加角色"))
@import cn.hn.java.summer.utils.JsonUtils
@args Boolean isEdit
@args List<RoleFunc> roleFuncList
<div id="jsTreeView">
</div>
    @section(script4){
    <script type="text/javascript">
        $(function(){
            var data=JSON.parse('@JsonUtils.toJson(roleFuncList)');
            console.log(data);
            //生成区域树数据
			var areaTree=util.el.genNoDelayTree({
				data:data,
				rootText:"权限分配",
				rootValue:"0",
				dataParentId:"parentId",
				dataTextName:"functionName",
				dataValueName:"functionId",
				showStyle:"noDelay"
			});
			console.log(areaTree);
			$("#jsTreeView").treenomal({
				text: "text",
				value: "value",
				depth: 3,
				textName: "functionName",
				valueName: "functionId",
				selectedValue: "001",
				data: areaTree
			});

        });
    </script>
    }